package com.woniu.cq.medical.controller;


import com.woniu.cq.medical.common.PageResult;
import com.woniu.cq.medical.service.AttendanceRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Lucas
 * @since 2020-09-07
 */
@RestController
@RequestMapping("/medical/attendance-record")
public class AttendanceRecordController {
    @Autowired
    private AttendanceRecordService attendanceRecordService;

    @GetMapping("pageQuery")
    public PageResult getPage(@RequestParam(defaultValue = "1")int pageIndex, @RequestParam(defaultValue = "15")int pageSize,
                              String administrativeName, String doctorName,String doctorDuty,Date attendanceDateBefore, Date attendanceDateAfter){
        PageResult pageResult = attendanceRecordService.pageQuery(pageIndex, pageSize, administrativeName, doctorName,doctorDuty,attendanceDateBefore, attendanceDateAfter);
        return pageResult;
    }

}

